package JavaSE.CODE.javaIO;


import java.io.BufferedReader;
import java.io.FileReader;

public class BufferedReaderDemo {
    public static void main(String[] args) throws Exception{
        //
        BufferedReader bufferedReader = new BufferedReader(new FileReader("D:\\liric.txt"));
        //
        /*
        char[] buf = new char[1024];
        int count = 0;
        while((count=bufferedReader.read(buf))!=-1){
            System.out.println(new String(buf, 0, count));//每次读1024个字符，作为一组输出，直到输出完
        }
        */

        String line = null;
        while((line=bufferedReader.readLine())!=null){
            System.out.println(line);
        }



        //
        bufferedReader.close();

    }
}
